/*
 * --------------------------------------------------------------
 * Copyright ©  2015 Hangzhou DtDream Technologies Co.,Ltd.
 * --------------------------------------------------------------
 *      Product: 协同数治
 *  Module Name: design
 * Date Created: 2023/3/14
 *  Description: TODO
 * --------------------------------------------------------------
 * Modification History
 * DATE            NAME            Description
 * --------------------------------------------------------------
 * 2023/3/14       yewj            TODO
 * --------------------------------------------------------------
 */

package com.dtdream.pattern.responsibility;

/**
 * TODO
 *
 * @Author: yewj
 **/
public class Client {
    public static void main(String[] args) {
        PurchaseRequest purchaseRequest = new PurchaseRequest(1, 31000, 1);

        DepartmentApprover departmentApprover = new DepartmentApprover("张主任");
        CollegeApprove collegeApprove = new CollegeApprove("李院长");
        ViceSchoolApprove viceSchoolApprove = new ViceSchoolApprove("钱副校长");
        SchoolMasterApprove schoolMasterApprove = new SchoolMasterApprove("王校长");

        departmentApprover.setApprove(collegeApprove);
        collegeApprove.setApprove(viceSchoolApprove);
        viceSchoolApprove.setApprove(schoolMasterApprove);
        schoolMasterApprove.setApprove(departmentApprover);

        departmentApprover.processRequest(purchaseRequest);
    }
}
